
/*function test(){
	alert("test");
}
*/
function query_vehicleApplyManager(page) {
	sys_loading();
	var parm = $('#queryApplyForm').serialize()+ (page != null ? ('&page=' + page) : '');
	var url = create_url("vehicleApplyManager-query");
	$.ajax({type:'POST', url:url, data:parm,
		success: function(result) {
			sys_loading_close();
			$('#page_content').html(result);
			swiperNested1.reInit();		// 刷新样式计算
		}
	});
}

function detail_vehicleApplyManager(code) {
	var parm = {"code":code};
	var url = create_url('vehicleApplyManager-detail');
	$.ajax({type:'POST', url:url,data:parm,
			success: function(result){
				sys_loading_close();
				$("#page_content").html(result);
			}
		
		
	});
	
	
}


//点击查看完以后,修改确认状态
function updateDesignate1_vehicleApplyManager(code) {
	var parm = {'code':code};
	var url = create_url('vehicleApplyManager-updateDesignate1');
	$.ajax({ type:'POST',url:url,data:parm,
			success:function(result){
				if (result == 'success') {
					alert("审核成功");
					sys_load_handle('vehicleApplyManager');
				} else if (result == 'exists') {
					alert("对不起！你已经审核过了！");
					sys_load_handle('vehicleApplyManager');
				} else if (result == 'error') {
					alert('对不起! 你没有权限');
				} else if (result == 'parameter_error') {
					alert('对不起! 上级还未审核');
				} else {
					alert('操作失败!');
				}
			}
		
	});
	
}

function check_vehicleApplyManager() {
	var remark = $('#remark').val();
	if (remark == null || remark == ''){
		$('#remark').css('border-color','red');
	}
}

//点击查看完以后,修改确认状态
function updateDesignate2_vehicleApplyManager(code) {
	var remark = $('#remark').val();
	if (remark == null || remark == ''){
	//	$.Zebra_Dialog('亲，要说明驳回原因的哦！');
		alert('亲，要说明驳回原因的哦！');
		return false;
	}
	var parm =  {'code':code, 'remark': remark};
	var url = create_url('vehicleApplyManager-updateDesignate2');
	$.ajax({type:'POST',url:url, data:parm,
		success:function (result) {
				sys_submiting_close();
			if (result == 'success') {
				sys_msg('操作成功!');
				sys_load_handle('vehicleApplyManager');
			} else if (result == 'exists') {
				sys_msg('对不起！已经审核过了！');
			} else if (result == 'error') {
				sys_msg('对不起! 你没有权限');
			} else if (result == 'parameter_error') {
				sys_msg('对不起! 上级还未审核');
			} else {
				sys_msg('操作失败!');
			}
		}
	});
}